1. Field of the Invention
The present invention relates generally to web services publishing and hosting environments, and more specifically to preventing web server error codes on dynamically loaded missing images in a web page.
2. Description of the Related Art
For every request to a web server, the web server responds with a return status code. Hypertext Transport Protocol (HTTP) status codes returned by a web server can provide useful information to dynamic web applications. An application that analyzes these return codes may branch into different functionality based on the return code. Some of these codes, such as the Not Found error message (404) are also used by server administrators to diagnose server issues. While 404 errors can reveal a number of problems including server issues, publishing path issues, or back-end web site programming issues, the monitoring of an excessive number of non-problematic 404 errors can waste valuable time and resources, since non-problematic error codes may cloud actual 404 errors that the server administrators are looking for and seeking to fix. This situation may arise, for example, when an application on a web site attempts to load a set of dynamically defined images based on programmatically generated lists that are passed to the applications. Some or all of the images listed actually may not be available on the website until some time after the list has been generated. The application does not know which images exist and which do not exist, and therefore checks for an error code, such as a 404 error, on the image load. The application may invoke one set of methods if the image exists, and another set of methods if the image does not exist. However, the non-existence of the image is not an exception condition for the application. This application tactic may result in an excessively high number of non-problematic server error codes being generated when an application tries to load images that may not exist on the server.